package com.cfpl.admin_vegetable_service.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cfpl.admin_vegetable_service.DTO.VegNameAndPlantLocationDTO;
import com.cfpl.admin_vegetable_service.VO.QualityInspectionPageVO;
import com.cfpl.project_common.pojo.QualityInspectionRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
* @author 14720
* @description 针对表【quality_inspection_record(质量检查记录表)】的数据库操作Mapper
* @createDate 2023-11-02 10:16:29
* @Entity com.cfpl.project_common.pojo.QualityInspectionRecord
*/
@Mapper
public interface QualityInspectionRecordMapper extends BaseMapper<QualityInspectionRecord> {
    /**
     * 分页查询质量检测记录
     * @param page  分页信息
     * @param condition  查询条件
     * @return  质量检测记录
     */
    Page<QualityInspectionPageVO> pageQueryByCondition(IPage<QualityInspectionPageVO> page, @Param("condition") String condition);
    /**
     * 添加质量检测记录
     * @param qualityInspectionRecord 质量检测记录对象
     * @return
     */
    void insertQualityInspectionRecord(@Param("qualityInspectionRecord") QualityInspectionRecord qualityInspectionRecord);
    /**
     * 根据样品编号（进场批次）查询果蔬名称和种植地
     * @param sampleNumber
     * @return
     */
    VegNameAndPlantLocationDTO queryBySampleNumber(String sampleNumber);
}




